package program03;

/**
 * @version 1.0
 * @since:
 * @ClassName:MobilePhoneEnum
 * @author: Li Jiahui
 * @date: 2021-01-16 13:29
 * 手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）MobilePhoneEnum为手机卡类的实现
 */
public class MobilePhoneEnum {
    //1.自定义成员变量
    String cardType;
    String cardNumber;
    String userName;
    String password;
    double accountBalance;
    int callTime;
    double netByte;
    //3.构造无参和有参的构造方法
    public MobilePhoneEnum() {
    }
    public MobilePhoneEnum(String cardType, String cardNumber, String userName, String password, double accountBalance, int callTime, double netByte) {
        setCardType(cardType);
        setCardNumber(cardNumber);
        setUserName(userName);
        setPassword(password);
        setAccountBalance(accountBalance);
        setCallTime(callTime);
        setNetByte(netByte);
    }
    //2.提供公有的get和set方法
    public String getCardType() {
        return cardType;
    }
    public void setCardType(String cardType) {
        this.cardType = cardType;
    }
    public String getCardNumber() {
        return cardNumber;
    }
    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public double getAccountBalance() {
        return accountBalance;
    }
    public void setAccountBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }
    public int getCallTime() {
        return callTime;
    }
    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }
    public double getNetByte() {
        return netByte;
    }
    public void setNetByte(double netByte) {
        this.netByte = netByte;
    }
    //4.显示一个（卡号 + 用户名 + 当前余额）
    void show(){
        System.out.println("卡号为：" + this.cardNumber + ", 用户名为：" + this.userName + ",当前余额为：" + this.accountBalance);
    }

}
